package com.sskj.wallet.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.wallet.bean.RecordInfoBean;
import com.sskj.wallet.http.HttpConfig;
import com.sskj.wallet.ui.activity.RecordInfoActivity;


public class RecordInfoActivityPresenter extends BasePresenter<RecordInfoActivity> {
    public void getData(String hashstr) {
        httpService.getRecordInfo(hashstr)
                .execute(new JsonCallBack<HttpData<RecordInfoBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<RecordInfoBean>> response) {
                        HttpData<RecordInfoBean> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.updateUI(httpData.getData());
                        }
                    }
                });

    }
}
